package com.googlecode.pacswitch;

import javax.xml.bind.annotation.adapters.XmlAdapter;

/**
 * @author Andrey Pavlenko
 */
public class PIntegerAdapter extends XmlAdapter<String, PInteger> {

    @Override
    public PInteger unmarshal(final String v) throws Exception {
        return new PInteger(v);
    }

    @Override
    public String marshal(final PInteger v) throws Exception {
        return v == null ? null : v.toString();
    }
}
